package com.y.mytest;

import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
import org.apache.poi.hssf.usermodel.HSSFPatriarch;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;

@SpringBootTest
class MytestApplicationTests2 {

    @Test
    void contextLoads() {
        JSONObject jsonObject = JSONObject.parseObject(null);
    }


    public static void main(String[] args) throws ParseException {
        System.out.println("2020-06-07".substring(0, 7));
        /*if("2020-06-07,2020-06-13,2020-06-14,2020-06-21,2020-06-25,2020-06-26,2020-06-27".contains("2020-06-07")){
            System.out.println(1);
        }*/
        System.out.println(RandomStringUtils.random(6, true, true));
        System.out.println(RandomStringUtils.random(6, false, true));
        System.out.println(RandomStringUtils.random(6, true, false));
        System.out.println(RandomStringUtils.random(6, false, false));
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        DateFormat dfw = new SimpleDateFormat("yyyyMMddHHmmss");
        System.out.println(df.format(dfw.parse("20210126141623")));
    }
}
